package touro.finances.model;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class FinancesDatabase {

	private static final String URL = "jdbc:sqlite:finances.db";
	
	private Connection connection;
	private SqlStatements sql;
	
	public FinancesDatabase() throws SQLException, IOException {
		
		DriverManager.registerDriver( new org.sqlite.JDBC() );
		
		connection = DriverManager.getConnection(URL);
		sql = new SqlStatements();
	}
	
	public Connection getConnection() {
		return connection;
	}
	
	public String getSql( String name ) {
		return sql.getProperty(name);
	}
	
}
